\documentclass{report}
\usepackage[UTF8]{ctex}
\usepackage{amsthm,amsmath,amssymb}
\usepackage{mathrsfs} %导入花体数学字母
\usepackage{caption}
\usepackage{graphicx, subfig} %插入图片
\usepackage{listings} %插入代码
\usepackage{xcolor} %语法高亮
\usepackage{fontspec} %字体包
\usepackage{diagbox} % 斜线表头
\usepackage{geometry} %设置页面
\usepackage{enumerate}
\usepackage[colorlinks,linkcolor=blue]{hyperref} %超链接
\usepackage{marginnote} % 在正文旁边添加注释文字

\setlength{\marginparwidth}{0.6in} %页边空白处设定宽度0.6英寸
\let\oldmarginpar\marginpar
\renewcommand\marginpar[1]{\-\oldmarginpar[\raggedleft\footnotesize\color{red} #1]%
	{\raggedright\footnotesize\color{red} #1}} % 注释文字用红色footnote 大小
\marginparsep = 10pt %与正文间隔10pt

% \marginpar{需要添加的内容}
% 显示或隐藏页边注释，只要在文件头添加下面的语句，把它注释掉后又显示页边内容
% \renewcommand{\marginpar}[2][]{}

\geometry{a4paper,left=2cm,right=2cm,top=2cm,bottom=2cm}

\usepackage{fancyhdr}
\usepackage{lipsum}
\pagestyle{fancy}

\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\arabic{section}.\ #1}}
\lhead[\thepage]{\leftmark} 
\rhead[\nouppercase{\rightmark}]{\thepage}

\lstset{
	columns=fixed,       
	numbers=left,                                        % 在左侧显示行号
	numberstyle=\color{black},                       % 设定行号格式
	basicstyle=\fontspec{Consolas}\small\color[RGB]{212,212,212},
	tabsize=4,
	frame=single,                                        % 背景边框
	rulecolor=\color[rgb]{0,0,0},                  % 边框颜色
	extendedchars=false,                                 % 解决换页问题
	backgroundcolor=\color[RGB]{30,30,30},            % 设定背景颜色
	keywordstyle=\color[RGB]{156,220,254},                 % 设定关键字颜色
	identifierstyle=\color[RGB]{86,156,214},                       % 普通标识符颜色
	commentstyle=\it\color[RGB]{106,153,73},                % 设置代码注释的格式
	stringstyle=\rmfamily\slshape\color[RGB]{206,145,91},   % 设置字符串格式
	showstringspaces=false,                              % 不显示字符串中的空格
	language=c++,                                        % 设置语言
	escapeinside=``,                                     % 逃逸字符
	xleftmargin=1em,                                     % 边距设置
	xrightmargin=1em, 
	aboveskip=1em
}

\title{{\Huge Homework7\\ 数值分析}}
\author{{\LARGE 3190105815 信息与计算科学\ 行一凡}}
\date{{\LARGE \today}}

\begin{document}
	\maketitle
	\section*{Exercise 7.13.}
	由定义有
	\begin{equation}\label{key}
		\begin{aligned}
			\|\mathbf{g}\|_{\infty} = \max_{1\le i\le N}|g_i| &= O(h)\\ 
			\|\mathbf{g}\|_{1} = h\sum_{i=1}^{N}|g_i| &= h[(N-2)O(h^2)+O(h)] = O(h^2)\\ 
			\|\mathbf{g}\|_{2} = \left(h\sum_{i=1}^{N}|g_i|^2\right)^{\frac{1}{2}} &= \left\{h[(N-2)O(h^4)+O(h^2)]\right\}^{\frac{1}{2}} = O(h^{\frac{3}{2}})
		\end{aligned}
	\end{equation}

	\section*{Exercise 7.34.}
	设$ B_E $ 第一列为$ B_1 = (b_0,b_1,\cdots,b_{m+1})^T $，则有线性方程组
	\begin{equation}\label{key}
		\left\{
		\begin{aligned}
			&-hb_0+hb_1 = h^2,\\ 
			&b_0-2b_1+b_2 = 0,\\ 
			&\cdots\\ 
			&b_{m-1}-2b_{m}+b_{m+1} = 0,\\ 
			&b_{m+1} = 0
		\end{aligned}
		\right.
	\end{equation}
	则可解得$ B_1 = \left(
		-(m+1)h,
		-(m+2)h,
		\cdots,
		-2h,
		-h, 
		0\right)^T $
	，由于 $ h = \frac{1}{m+1} $，从而有
	\begin{equation}\label{key}
		B_1 = \left(
		-1,
		-\frac{m+2}{m+1},
		\cdots,
		-\frac{2}{m+1},
		-\frac{1}{m+1},
		0\right)^T
	\end{equation}$  $
	即证。
	
	\section*{Exercise 7.39.}
	由于对 $ \frac{\partial^2u}{\partial x^2} $ 和 $ \frac{\partial^2u}{\partial y^2} $ 分别使用了 FD 公式
	\begin{equation}\label{key}
		D^{2}u(\overline{x}) = \dfrac{u(\overline{x}-h) - 2u(\overline{x}) + u(\overline{x}+h)}{h^{2}}
	\end{equation}
	并且有误差估计
	\begin{equation}\label{key}
		u^{\prime\prime}(\overline{x})-D^{2}u(\overline{x}) = -\dfrac{h^{2}}{12}u^{(4)}(x) + O(h^4)
	\end{equation}
	分别将 $ u $ 看做单变量函数，代入得到
	\begin{equation}\label{key}
		\begin{aligned}
			\dfrac{\partial^2u}{\partial x^2}(x_i,y_j)-D^{2}u(x_i,y_j) = -\dfrac{h^{2}}{12}\dfrac{\partial^4u}{\partial x^4}(x_i,y_j) + O(h^4)\\ 
			\dfrac{\partial^2u}{\partial y^2}(x_i,y_j)-D^{2}u(x_i,y_j) = -\dfrac{h^{2}}{12}\dfrac{\partial^4u}{\partial y^4}(x_i,y_j) + O(h^4)
		\end{aligned}
	\end{equation}
	两式相加即有
	\begin{equation}\label{key}
		\tau_{i,j} = -\dfrac{1}{12}h^2\left(\dfrac{\partial^4u}{\partial x^4} + \dfrac{\partial^4u}{\partial y^4}\right)\bigg|_{(x_i,y_j)} + O(h^4)
	\end{equation}
	即证。
	
	\section*{Exercise 7.60.}
	对于规则点，由于五点格适用，因此由 Exercise 7.39 有
	\begin{equation}\label{key}
		\tau_{P} = -\dfrac{1}{12}h^2\left(\dfrac{\partial^4u}{\partial x^4} + \dfrac{\partial^4u}{\partial y^4}\right)\bigg|_{P} + O(h^4) = O(h^2)
	\end{equation}
	而对于不规则点，利用公式
	\begin{equation}\label{key}
		L_hU_P = \dfrac{(1+\theta)U_P-U_A-\theta U_W}{\frac{1}{2}\theta(1+\theta)h^2} + \dfrac{(1+\alpha)U_P-U_B-\alpha U_S}{\frac{1}{2}\alpha(1+\alpha)h^2}
	\end{equation}
	将两项分别记为$ I_{\theta},\ I_{\alpha} $，则对$ I_{\theta} $有
	\begin{equation}\label{key}
		\begin{aligned}
			U_A &= u(x_P+\theta h,y_P)\\ 
			&= U_P + \theta h\dfrac{\partial u}{\partial x}\Big|_{(x_P,y_P)} + \dfrac{\theta^2 h^2}{2}\dfrac{\partial^2 u}{\partial x^2}\Big|_{(x_P,y_P)}\\ 
			&+ \dfrac{\theta^3 h^3}{6}\dfrac{\partial^3 u}{\partial x^3}\Big|_{(x_P,y_P)} + \dfrac{\theta^4 h^4}{24}\dfrac{\partial^4 u}{\partial x^4}\Big|_{(\xi_P,y_P)}
		\end{aligned}
	\end{equation}
	\begin{equation}\label{key}
		\begin{aligned}
			U_W &= u(x_P-h,y_P)\\ 
			&= U_P -h\dfrac{\partial u}{\partial x}\Big|_{(x_P,y_P)} + \dfrac{ h^2}{2}\dfrac{\partial^2 u}{\partial x^2}\Big|_{(x_P,y_P)}\\ 
			&- \dfrac{h^3}{6}\dfrac{\partial^3 u}{\partial x^3}\Big|_{(x_P,y_P)} + \dfrac{h^4}{24}\dfrac{\partial^4 u}{\partial x^4}\Big|_{(\zeta_P,y_P)}
		\end{aligned}
	\end{equation}
	其中$ \xi_P\in(x_P,x_P+\theta h),\ \zeta_P\in(x_P-h,x_P) $。代回得到
	\begin{equation}\label{key}
		\begin{aligned}
			I_{\theta} &= -\dfrac{1}{\frac{1}{2}\theta(1+\theta)h^2}\left[(\theta^2+\theta)\dfrac{h^2}{2}\dfrac{\partial^2 u}{\partial x^2}+(\theta^3-\theta)\dfrac{h^3}{6}\dfrac{\partial^3 u}{\partial x^3}+(\theta^4+\theta)\dfrac{h^4}{24}\dfrac{\partial^4 u}{\partial x^4}\right]\Bigg|_{(x_P,y_P)}\\ 
			&= -\dfrac{\partial^2 u}{\partial x^2}\Big|_P + \dfrac{(1-\theta)h}{3}\dfrac{\partial^3 u}{\partial x^3}\Big|_P - \dfrac{(\theta^2-\theta+1)h^2}{12}\dfrac{\partial^4 u}{\partial x^4}\Big|_P
		\end{aligned}
	\end{equation}
	同理可得
	\begin{equation}\label{key}
		I_{\alpha} = -\dfrac{\partial^2 u}{\partial y^2}\Big|_P + \dfrac{(1-\alpha)h}{3}\dfrac{\partial^3 u}{\partial y^3}\Big|_P - \dfrac{(\alpha^2-\alpha+1)h^2}{12}\dfrac{\partial^4 u}{\partial y^4}\Big|_P
	\end{equation}
	从而有
	\begin{equation}\label{key}
		\begin{aligned}
			\tau_P &= L_hU_P - \left(-\dfrac{\partial^2 u}{\partial x^2}\Big|_P -\dfrac{\partial^2 u}{\partial y^2}\Big|_P\right)\\ 
			&= \left[\dfrac{(1-\theta)}{3}\dfrac{\partial^3 u}{\partial x^3}+\dfrac{(1-\alpha)}{3}\dfrac{\partial^3 u}{\partial y^3}\right]\Bigg|_P h\\ 
			&- \left[\dfrac{(\theta^2-\theta+1)h^2}{12}\dfrac{\partial^4 u}{\partial x^4} + \dfrac{(\alpha^2-\alpha+1)h^2}{12}\dfrac{\partial^4 u}{\partial y^4}\right]\Bigg|_P h^2\\ 
			&= O(h)
		\end{aligned}
	\end{equation}
	即证。
	
	\section*{Exercise 7.62.}
	令 $ T_{\max} = \max_{P\in\mathbf{X}_{\Omega}}\left\{\frac{T_1}{c_1},\frac{T_2}{C_2}\right\} $ ，可构造函数 $ \psi_P = E_P + T_{\max}\phi_P $ ，则有
	\begin{equation}\label{key}
		\begin{aligned}
			&\forall P\in\mathbf{X}_1,\quad &L_h\psi_P = L_hE_P + L_h T_{\max}\phi_P \le -T_P - C_1T_{\max} \le 0\\ 
			&\forall P\in\mathbf{X}_2,\quad &L_h\psi_P = L_hE_P + L_h T_{\max}\phi_P \le -T_P - C_2T_{\max} \le 0
		\end{aligned}
	\end{equation}
	从而满足 Lemma 7.55 的条件。由于 $\phi$ 非负，因此 $ T_{\max}\phi_P \ge 0$ ，再由边界的极大模则有
	\begin{equation}\label{key}
		\begin{aligned}
			E_P &\le \max_{P\in\mathbf{X}_{\Omega}}(E_P+T_{\max}\phi_P)\\ 
			&\le \max_{Q\in\mathbf{X}_{\partial\Omega}}(E_Q+T_{\max}\phi_Q) = T_{\max}\max_{Q\in\mathbf{X}_{\partial\Omega}}(\phi_Q)
		\end{aligned}
	\end{equation}
	同理，取函数 $ \psi_P = -E_P + T_{\max}\phi_P $，则有
	\begin{equation}\label{key}
		-E_P\le T_{\max}\max_{Q\in\mathbf{X}_{\partial\Omega}}(\phi_Q)
	\end{equation}
	即证。
	
	
\end{document}